package team.seekers.skill.controller;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;
import team.seekers.skill.result.Result;
import team.seekers.skill.service.OssService;

/**
 * @author Godc
 * @description
 */
@RestController
@RequestMapping("/api/oss")
public class OssController {
    @Autowired
    private OssService ossService;
    //图片
    @PostMapping("")
    public Result uploadOssFile(MultipartFile file){
        String url = ossService.uploadFileAvatar(file);
        return Result.success().data("url",url);
    }
}
